<?php
/**
 *  HTTP Request Interface
 *
 */
interface Yz_HTTP_Request_Interface
{

    /** fetch HTTP request header, case-insensitive
     *      e.g. Accept-Encoding
     *  @param string
     *  @return string|null
     */
    public function fetchHeader( $header );

    /**
     *  @return array?|false
     */
    public function getAcceptLanguage();

    /** get the Hostname of the running HTTP server
     *  @return string
     */
    public function getHostname();

    /** get the timestamp of if-modified-since
     *  @return int|false
     */
    public function getIfModifiedSince();

    /**
     *  @return string {GET|POST}
     */
    public function getMethod();

    /**
     *  @return string
     */
    public function getPath();

    /** get the query string
     *  @return string
     */
    public function getQuery();

    /**
     *  @return string
     */
    public function getRemoteAddr();

    /** get the prefix for all links to the system's objects
     *      the name always ends with '/'
     *      Examples:
     *      /                   : if installed in Document-Root, Rewrite enabled
     *      /index.php          : same, Rewrite disabled
     *      /my-app/            : if installed in subdirectory $DocumentRoot/my-app, Rewrite enabled
     *      /my-app/myentryscript.php/  : same, Rewrite disabled, entry script named myentryscript.php
     *  @return string
     */
    public function getWebPrefix();

    /** get the web path to Yz root directory
     *      the name always ends with '/'
     *  @return string
     */
    public function getWebRoot();

    /**
     *  @return bool
     */
    public function isPOST();
}
